<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="com.fz.mabatis.DbHelper" %>
<%@ page import="java.util.List" %>
<%@ page import="com.fz.Mapper.StudentMapper" %>
<%@ page import="com.fz.entity.Student" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>webrx-title</title>
</head>
<body>
<h2>Hello World!</h2>

<%
    SqlSession ss = new DbHelper().getSession();
    StudentMapper bdao = ss.getMapper(StudentMapper.class);
    List<Student> bks = bdao.query();
    pageContext.setAttribute("student",bks);

%>
<c:forEach items="${student}" var="st">
    ${st.name}<br>
</c:forEach>
</body>
</html>